TDMA Networking using Commodity NIC/Switch

ABSTRACT

A network element one or more network ports, network time circuitry and packet processing circuitry. The network ports are configured to communicate with a communication network. The network time circuitry is configured to track a network time defined in the communication network. In some embodiments the packet processing circuitry is configured to receive a definition of one or more timeslots that are synchronized to the network time, and to send outbound packets to the communication network depending on the timeslots. In some embodiments the packet processing circuitry is configured to process inbound. packets, which are received from the communication network, depending on the timeslots.

FIELD OF THE INVENTION

The present invention relates generally to computer networks, andparticularly to Time-Division-Multiplexing (TDM) andTime-Division-Multiple-Access (TDMA) communication over networks.

BACKGROUND OF THE INVENTION

Various techniques for enforcing Time-Division-multiplexing (TDM)discipline in networks such as Ethernet are known in the art. Forexample, in “Practical TDMA for Datacenter Ethernet”, published by theDepartment of Computer Science and Engineering, University ofCalifornia, San Diego, April, 2012, Vattikonda et al. describe a designand implementation of a TDMA medium access control (MAC) layer forcommodity Ethernet hardware that allows end hosts to dispense with TCP'sreliability and congestion control.

In another example, U.S. Patent Application Publication 2019/0319730describes techniques to operate a Time Division Multiplexing (TDM) MACmodule, including examples of facilitating use of shared resourcesallocated to ports of a network interface based on a timeslot mechanism,wherein the shared resources are allocated to packet data received orsent through the ports of the network interface.

SUMMARY OF THE INVENTION

An embodiment of the present invention that. is described hereinprovides a network element including one or more network ports, networktime circuitry and packet processing circuitry. The network ports areconfigured to communicate with a communication network. The network timecircuitry is configured to track a network time defined in thecommunication network. The packet processing circuitry is configured toreceive a definition of one or more timeslots that are synchronized tothe network time, and to send outbound packets to the communicationnetwork depending on the timeslots.

In some embodiments, the one or more timeslots include a plurality oftimeslots that are assigned to the network element in a periodic timeschedule that is synchronized to the network time. In an embodiment, thepacket processing circuitry is configured to send the outbound packetsonly during the one or more timeslots. In another embodiment, the packetprocessing circuitry is configured to generate a series of dummypackets, to record network times corresponding to egress of the dummypackets, and to send the outbound packets to the communication networkdepending on the one or more timeslots and on the recorded networktimes.

In some embodiments, the network ports are configured to send theoutbound packets to a wireless network operating in Time-DivisionMultiple Access (TDMA). In other embodiments the network ports areconfigured to send the outbound packets to an optical switching networkoperating in TDMA. In some embodiments, in addition to sending theoutbound packets depending on the timeslots, the packet processingcircuitry is configured to send additional packets to the communicationnetwork independently of the timeslots. In some embodiments, theoutbound packets include Ethernet packets or Infiniband packets.

There is additionally provided, in accordance with an embodiment of thepresent invention, a network element including one or more networkports, network time circuitry and packet processing circuitry. Thenetwork ports are configured to communicate with a communicationnetwork. The network time circuitry is configured to track a networktime defined in the communication network. The packet processingcircuitry is configured to receive a definition of one or more timeslotsthat are synchronized to the network time, and to process inboundpackets, which are received from the communication network, depending onthe timeslots.

In an example embodiment, the packet processing circuitry is configuredto process an inbound packet only if an arrival time of the inboundpacket is during the one or more timeslots.

There is also provided, in accordance with an embodiment of the presentinvention, a network element including one or more network ports,network time circuitry and packet processing circuitry. The networkports are configured to communicate with a communication network. Thenetwork time circuitry is configured to track a network time defined inthe communication network. The packet processing circuitry is configuredto queue outbound packets in one or more queues, to assign credits tothe queues depending on the network time, and to transmit the outboundpackets to the communication network in accordance with the assignedcredits.

There is further provided, in accordance with an embodiment of thepresent invention, a network element including one or more networkports, network time circuitry and packet processing circuitry. Thenetwork ports are configured to communicate with a communicationnetwork. The network time circuitry is configured to track a networktime defined in the communication network. The packet processingcircuitry is configured to queue outbound packets pending fortransmission to the communication network, and to transmit a pendingoutbound packet to the communication network synchronously with an eventthat is defined in accordance with the network time.

There is moreover provided, in accordance with an embodiment of thepresent invention, a network element including one or more networkports, network time circuitry and packet processing circuitry. Thenetwork ports are configured to communicate with a communicationnetwork. The network time circuitry is configured to track a networktime defined in the communication network. The packet processingcircuitry is configured to transmit outbound packets to thecommunication network, and to stop transmission of an outbound packet ata specified time in accordance with the network time.

There is additionally provided, in accordance with an embodiment of thepresent invention, a network element including one or more networkports, network time circuitry and packet processing circuitry. Thenetwork ports are configured to communicate with a communicationnetwork. The network time circuitry is configured to track a networktime defined in the communication network. The packet processingcircuitry is configured to receive inbound packets from thecommunication network, to determine times-of-arrival of the inboundpackets, in accordance with the network time, and to distribute theinbound packets to multiple queues based on the times-of-arrival.

There is also provided, in accordance with an embodiment of the presentinvention, a method for communication including, in a network elementconnected to a communication network, tracking a network time defined inthe communication network. A definition of one or more timeslots, whichare synchronized to the network time, is received. Outbound packets aresent from the network element to the communication network, depending onthe timeslots.

There is additionally provided, in accordance with an embodiment of thepresent invention, a method for communication including, in a networkelement connected to a communication network, tracking a network timedefined in the communication network. A definition of one or moretimeslots, which are synchronized to the network time, is received.Inbound packets, which are received from the communication network, areprocessed depending on the timeslots.

There is additionally provided, in accordance with an embodiment of thepresent invention, a method for communication including, in a networkelement connected to a communication network, tracking a network timedefined in the communication network. Outbound packets are queued 1T1one or more queues. Credits are assigned to the queues depending on thenetwork time. The outbound packets are transmitted from the networkelement to the communication network in accordance with the assignedcredits.

There is further provided, in accordance with an embodiment of thepresent invention, a method for communication including, in a networkelement connected to a communication network, tracking a network timedefined in the communication network. Outbound packets, pending fortransmission to the communication network, are queued. A pendingoutbound packet is transmitted from the network element to thecommunication network synchronously with an event that is defined inaccordance with the network time.

There is additionally provided, in accordance with an embodiment of thepresent invention, a method for communication including, a networkelement connected to a communication network, tracking a network timedefined in the communication network. Outbound packets are transmittedfrom the network element to the communication network. Transmission ofan outbound packet stopped at a specified time in accordance with thenetwork time.

There is also provided, in accordance with an embodiment of the presentinvention, a method for communication including, a network elementconnected to a communication network, tracking a network time defined inthe communication network. Inbound packets are received in the networkelement from the communication network. Times-of-arrival of the inboundpackets are determined in accordance with the network time. The inboundpackets are distributed to multiple queues based on thetimes-of-arrival.

The present invention will be more fully understood from the followingdetailed description of the embodiments thereof, taken together with thedrawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 a block diagram that schematically illustrates a Time-DivisionMultiple Access (TDM) node in a radio access network, in accordance withan embodiment of the present invention;

FIG. 2 is a block diagram that schematically illustrates Precision TimeProtocol (PTP) support circuits 200 in accordance with embodiment of thepresent invention;

FIG. 3 is a graph that schematically illustrates values of PTP counters,in accordance with an embodiment of the present invention;

FIG. 4 is a block diagram that schematically illustrates time-basedingress packet processing in a network adapter, accordance toembodiments of the present invention;

FIG. 5 is a block diagram that schematically illustrates timedtransmission of packets from a network adapter, in accordance withembodiments of the present invention; and

FIG. 6 is a block diagram that schematically illustrates anoptic,=11-switching system, in accordance with an embodiment of thepresent invention.

DETAILED DESCRIPTION OF EMBODIMENTS Overview

Communication Networks such as Enhanced Common Public Radio Interface(eCPRI), Optical Data center Network (ODCN), video over IP (e.g.,Society of Motion Picture and Television Engineers (SMPTE) 2110) andothers, use Time Division Multiplex (TDM) or, sometimes,Time-Division-Multiple Access (TDMA) for communicating betweenendpoints, wherein a plurality of data sources share the same physicalmedium during different time intervals, which are referred to astimeslots.

eCPRI Is described, for example, in eCPRI Specification V2.0(2019-05-10), by Ericsson AB, Huawei Technologies Co. Ltd, NECCorporation and Nokia. Optical datacenter networks are described, forexample, in “NEPHELE: an end-to-end scalable and dynamicallyreconfigurable optical architecture for application-aware SDN clouddatacenters,” IEEE Communications Magazine (Volume: 56, Issue: 2, Feb.2018. DOI: 10.1109/MCOM2018.1600804), by Paraskevas Bakopoulos et al.

TDMA multiplexing in high performance networks requires goodsynchronization between the end points, which is usually achieved byhigh precision time bases. Specialized circuitry, such as that describedby Xilinx RoE Framer IP documentation (Xilinx PB056 (v2.1) Oct. 30,2019) may also be used to send and receive data in TDM network; however,such specialized circuitry may be expensive and inflexible.

Embodiments of the present invention that are disclosed herein providenetwork-time dependent network communications using network elements,including inexpensive network adapters such as Network InterfaceControllers (NICs) in the context of Ethernet™, or Host Channel Adapters(HCAs) in the context of InfiniBand. While the description hereinbelowrefers mainly to network adapters, the disclosed techniques are notlimited to network adapters, and may be used with any suitable networkelements, including, for example, switches and routers.

In some embodiments described herein, a network element (e.g., networkadapter, switch, router or the like) comprises one or more network portsfor communicating with a communication network, network time circuitry,and packet processing circuitry. The network time circuitry isconfigured to track a network time defined in the communication network.

In some embodiments, the packet processing circuitry is configured toreceive a definition of one or more timeslots that are synchronized tothe network time, and to send outbound packets to the communicationnetwork, or process inbound packets that are received from thecommunication network, depending on the timeslots.

In an example embodiment, the packet processing circuitry is configuredto queue outbound packets in one or more queues, to assign credits tothe queues depending on the network time, and to transmit the outboundpackets to the communication network in accordance with the assignedcredits.

In another example embodiment, the packet processing circuitry isconfigured to transmit a pending outbound packet to the communicationnetwork synchronously with an event that is defined in accordance withthe network time.

In yet another embodiment, the packet processing circuitry is configuredto stop transmission of an outbound packet at a specified time inaccordance with the network time.

In some embodiments, the packet processing circuitry is configured toreceive inbound packets from the communication network, to determinetimes-of-arrival of the inbound packets, in accordance with the networktime, and to distribute the inbound packets to multiple queues based onthe times-of-arrival.

In another example embodiment, the packet processing circuitry isconfigured to receive one or more time-slot allocations that areassigned to the network element in a TDM schedule that is synchronizedto the network time. The packet processing circuitry sends outboundpackets to the communication network, and/or processes inbound packetsthat are received from the communication network, only during thetimeslot allocations assigned to the network element.

In other words, in some embodiments certain TDM schedule is definedacross at least part of the communication network. As part of this TDMschedule, a certain network element is assigned specific timeslots. Insome embodiments the network element is permitted to send packets to thenetwork (often to a pre-assigned destination) only during the assignedtimeslots. Additionally or alternatively, in some embodiments thenetwork element is permitted to process received packets only if thepacket arrival times match the assigned timeslots. This mechanism isuseful, for example, for interacting with a wireless or opticalswitching networks that operates in TDMA. Examples of such use-cases aredescribed below.

In some embodiments the network element may send the packet to aspecific software entity, such as a queue, responsive to the time in.which the network element receives the packet.

According to an example embodiment, a network adapter comprises one ormore Ingress ports that receive TDM transmissions over an. Ethernetnetwork; the network adapter generates timestamps that correspond to thearrival time of the ingress packets, classifies the packets according tothe timestamps and to other packet information (such as variousheaders), and, responsive to the classification, forwards packets to ahost processor that is attached to the network adapter (will be referredto hereinbelow as “the processor” or “the host”).

According to embodiments, the network adapter may further comprise oneor more Egress ports; the network adapter receives packets from theprocessor and sends the packets in pre-defined timeslots to the Egressports.

In some embodiments, the reception and/or the transmission of TDM-basedpackets require a precision time-base, which is derived from ahigh-precision clock that the network adapter comprises. In anembodiment, the network adapter comprises a clock that is frequency andphase locked to the network timeline, and the processor comprises a mainclock (“wall clock”) that is configured to track the network adapterclock. This reduces the real-time workload of the processor.

In an embodiment, the network adapter comprises a Precision TimeProtocol (PTP) clock that synchronizes to the network timeline, andsupports commands such as “adjust time” and “set time”, As implementedin Linux Community open source PTP daemon-PTP41, and defined, forexample, in “Standard for a Precision Clock Synchronization Protocol forNetworked Measurement and Control Systems” (IEEE 1588-2008). In someembodiments, the network adapter further comprises a syntonizationcircuit, which continuously adjusts the frequency source of the networkadapter to the frequency source of the time-base of the network andsupports commands such as “adjust frequency” and “set frequency”.Certain aspects of Network adapters having on-board PTP clocks areaddressed, for example, in U.S. patent application 16/779,611, filedFeb. 2, 2020, and in U.S. patent application 16/782,075, filed Feb. 5,2020, which are both assigned to the assignee of the present patentapplication and whose disclosures are incorporated herein by reference.

According to some embodiments, to send packets at precisely predefinedtimeslots, the network adapter sends an evenly spaced infinite sequenceof dummy packets (that typically do not egress the network adapter).Whenever a packet is sent, the network adapter sends a Completion QueueEntry (CQE), comprising a timestamp (which may be derived from, thehigh-precision clock described above) and a Producer Index (PI), to theprocessor and to a loop-back circuitry that is used to time outgoingpackets. Each PI directly corresponds to a different time and can beused to specify a precise time. The processor sends packets to betransmitted to various queues within the network adapter (e.g., eachvirtual machine in the processor sends packets to a different queue) ,and adds “wait-for-PI” messages to the packets; thus, the processorprecisely controls the timeslot at which. the network adapter sends thepacket from. the egress port. In some embodiments, the network elementfurther comprises a time-based circuitry that blocks any packet that theegress circuitry may attempt to send to the network out the allocated.times tot (for example, due to a software error or backpressure from thenetwork or any other reason.).

According to an embodiment, the network adapter comprises a packetsteering circuitry, which is configured to steer packets by matching aset of parameters to predefined values, the set of parameters comprisinga Time-of-Arrival parameter. To receive a packet in a predefinedtimeslot, the network adapter timestamps the ingress packets (forexample, using the high precision clock described above). The processorthen controls the packet steering circuitry to match a timing parameterthat corresponds to the allocated timeslot of TDM packets. In someembodiments, the packet steering circuitry is configured to match thetimeline value to a range of values.

Note that any of the disclosed time-dependent techniques may be appliedto all packets, or to a selected subset of packets, e.g., packetsassociated with one or more specified ports or flows.

System Description

FIG. 1 is a block diagram that schematically illustrates a Time-DivisionMultiplex (TDM) node 100 in a radio access network, in accordance withan embodiment of the present invention. Node 10U comprises a NetworkAdapter that communicates with a TDM Network 104, a processor 106, aradio circuit 108 and a cellular antenna (or antennae array) 110. RadioCircuit 108 communicates wirelessly through antenna 110 with a pluralityof cellular devices (not shown), and interfaces with processor 106.Processor 106 is configured to control the radio circuit, and totransfer data between the antenna and, through network adapter 102, theTDM network. Processor 106 is further configured to receive times lotallocation for sending and receiving packets to or from the network. Thetimeslot allocation may be received from a processor that is not shown,through the network adapter or through any other means; in someembodiments the timeslot allocation is generated processor 106, whichmay send timeslot allocations to other nodes of the TDM network; inother embodiments, each processor of the network generates the timeslotallocation independently. The timeslots typically comprise transmittimeslots and receive timeslots, for transmitting and receiving packets,respectively.

Network Adapter 102 comprises an ingress port 112 that is configured toreceive packets from the network; an egress ports 114 that is configuredto send packets over the network; a time-based packet-steering unit 118(which is also referred to as “packet processing circuitry”); and, atimed transmit queue 120.

Ingress port 112 receives packets from 1DM network 104 and sends thepackets to time-based packet-steering 118. The time-basedpacket-steering steers the packets according to rules, comprisingconditions that the packet processor should check and actions that thepacket processor should execute if the conditions are met. Theconditions may comprise a time range and, optionally, some otherconditions derived, for example, from the headers of the packet; theaction may be, for example, forward the packet to processor 106 or, dropthe packet and send a suitable notification to the processor.

In an embodiment, the time range condition is set responsive to thereceive timeslot allocation that processor 106 sends to the networkadapter. For example, if the receive timeslot allocation indicates thatpackets that are destined to the current TDM node 100 are received atthe first 50 micro-second of every 1 milli-second cycle, the networkadapter (or, in some embodiments, processor 106) will calculate, in eachcycle, the start time and the end time during which the packet may bereceived. Time-based packet-steering 118 will thus be able to route tothe processor only packets that are received within the allocatedtimeslot (in some embodiments, as no packets destined to processor 106should be received outside the allocated ingress timeslot,packet-steering 118 does not check that the packet arrives at theallocated ingress timeslot). Aspects of time-aware packet steering arealso addressed in U.S. patent application Ser. No. 16/782,075, filedFeb. 5, 2020, cited above.

Timed-Transmit-Queue 120 is configured to send packets over TDM Network104 through Egress Port 114 according to the transmit timeslotallocation that processor 106 receives. In an embodiment, Timed-TransmitQueue 120 may comprise a plurality of queues for different packet flows(for example, each queue may be allocated to a separate virtual machinewithin processor 106), and each flow may be allocated a sub-timeslotwithin the timeslot allocated for TDM-node 100. The network adaptertranslates the timeslot allocation to a network time for the allocatedtimeslot, and Timed-Transmit-Queue sends a packet from one of theseparate queues to the network through egress Port 114.

Network Adapter 102 further comprises a Time-Based Transmit-Blockingunit 122, which is configured to block transmission of packets outsidethe allocated timeslot. In some embodiments, processor 106 appends astart-time and an end-time indicator to some or all the egress packets;the Time-Based Transmit-Blocking unit compares the start-time andend-time indications to the present time, and blocks the transmission ofpackets before or after the allocated timeslot.

In some embodiments, network adapter 102 further comprises a networktime circuitry (not shown) such as a Precision Time Clock (PTP), whichused to accurately time the TDM timeslots. The network time circuitrywill be described hereinbelow.

Thus, a TDM network such as that specified for the front-haul of eCPRImay be implemented using a network adapter attached to a processor;ingress packets that are received at pre-defined receive timeslots aredirected to the radio circuit, and data from, the radio-circuit ispacketized and sent over the network at predefined transmit timeslots.In embodiments according to the present invention, timeslots are checkedby hardware and hence the processor does not have to check timeslots bypolling, which would consume considerable computing resources, enforcingthe processes to accurately synchronize in time.

Although the description above (and further descriptions hereinbelow)refer to network adapters, other types of network elements may be usedIn alternative embodiments, such as switches, routers and the like.

As would be appreciated, the configuration of TDM Node 100, includingNetwork Adapter 102 are example configurations that are depicted purelyfor the sake of conceptual clarity. Other suitable configurations may beused in alternative embodiments of the present invention. For example,more network ports may be used, connecting to the same TDM network, toother TDM networks and/or to non TDM networks. In some embodiments, asingle port is implemented. In other embodiments, bidirectionalIngress/Egress ports are used.

In an embodiment, the network adapter calculates network timeline valuesthat correspond to the start and stop time of timeslots in a first TDMcycle, and thence calculates timeline values that correspond to thestart and stop time of further TDM cycles by repeatedly adding the timeduration of a TDM cycle to the start and stop time values (it should benoted that non-TDM queues may coexist with the TDM queues describedherein above).

Time Synchronization

In some embodiments according to the present invention, the networkadapter comprises a Precision Time Clock (PTP). PTP ls defined in IEEE1588-2008 “Standard for a Precision Clock Synchronization Protocol forNetworked Measurement and Control Systems” (hereinafter “the 1588”) andcomprises a hierarchical master-slave architecture for clockdistribution. Under this architecture, a timeline distribution systemconsists of one or more communication media (network segments), and oneor more clocks which are continuously synchronized to each other. Thus,the PTP timeline value can be adjusted to the network timeline. The PTPtimeline value is typically an 80-bit integer, comprising a day field(days from Jan. 1, 1970. Midnight) and a nanosecond field

In embodiments, a software PTP client, typically running on theprocessor, keeps a “wall clock” by continuously reading the networktimeline from the network adapter. The PTP client may send commands suchas “adjust time”, “set time” and “read time” to the PTP circuitry. ThePTP circuitry comprises an adjustable oscillator, a counter andsynchronization circuits to support such commands.

Fluctuation of the adjustable oscillator are measured, calculated andthen mitigated by readjusting the oscillator frequency (e.g., bychanging the n and m values of a PLL and/or by changing the voltageinput to a voltage-controlled oscillator (VCO)).

In some embodiments, the network adapter further comprises a circuitrythat generates timestamps at a time when an egress packet exits thenetwork adapter, and, at a time when an ingress packets enters thenetwork adapter; the network adapter then sends the timestamps to thePTP client, which uses the timestamps for the calculation of the networkpropagation delay from the network adapter to a peer network elementthat comprises the network timeline (“master timeline”).

In order to discipline a clock (that is—make it track the frequency andphase of a master clock), a PTP client continuously:

-   -   Exchanges packets with a network element that comprises the        master clock;    -   Extracts the master timeline from the ingress packets;    -   Measures the network delays using timestamps associated with the        exchanged packets;    -   Adjusts the time according to the master timeline and to the        delays, calculates the drift of the oscillator frequency (e.g.,        by dividing the time drift by the elapsed. time from the        previous measurement); and    -   Adjusts the oscillator to mitigate the measured frequency drift.

FIG. 2 is a block diagram that schematically describes PTP supportcircuits 200 in accordance with embodiment of the present invention. Thesupport circuits connect to an Ingress port 112 and an egress port 114(FIG. 1) that communicate with the network. PTP support circuits 200comprise an ingress timestamp generator 202, configured to generateprecise timestamps when packets from the network enter the networkadapter, an Egress timestamp generator 204, configured to generateprecise timestamps when packets from the network adapter are output tothe network, a PTP Client Software 206, and a PTP Circuitry 208. PTPClient Software 206 typically runs on processor 106. Timestampgenerators 202 and 204 and PTP Circuitry 208 are typically part ofnetwork adapter 102 in FIG. 1.

PTP Circuitry 208 comprises a programmable oscillator 210 (e.g., ahigh-precision Phase-Locked-Loop (PLL), a Voltage-Control Oscillator(VCO), or a combination of a PLL and a VCO) and a network-time. counter212, which counts the oscillator cycles in nanoseconds and days. In anembodiment, the counter comprises 80 bits. The PTP circuitry relays thecounter value to ingress timestamp generator 202 and egress timestampgenerator 204, to synchronize the timestamps to the network timeline.

The PTP client software is configured to:

-   -   i. Communicate packets with a peer network element that        comprises the network timeline;    -   ii. Receive timestamps from timestamp generators 202 and 204,        which pertain to the precise ingress and egress time of the        packets;    -   iii. Calculate the oscillator drift and adjust the programmable        oscillator frequency accordingly.    -   iv. Measure/Calculate the propagation delay;    -   v. Calculate the precise time and set counter 212 accordingly;

In embodiments, to further increase the PTP accuracy, the networkadapter compensates for internal pipeline delays when using the PTPtimeline. This can be done by routing the PTP time through a pipelinewith a matching delay, or by adding/subtracting the difference inpipeline delay to counter 212.

Thus, according to the example embodiment illustrated in FIG. 2, networkadapter 102 can keep a time counter synchronized to a remote networktimeline.

The configuration of PTP support circuits 200, shown in FIG. 2, is anexample configuration that is shown purely for the sake of conceptualclarity. Any other suitable configurations can be used in alternativeembodiments. For example, the network-time counter may count in otherresolutions or may be divided to other fields; part or all the clientsoftware functions may be implemented in specialized circuitry (ratherthan by processor 102), the timestamp that ingress timestamp generator202 generates may be concatenated to the corresponding ingress packet(e.g., as a header), and, the frequency drift measurement and adjustmentmay be split to a coarse part and a fine part.

FIG. 3 is a graph 300 that schematically illustrates the values of thePTP counters, in accordance with an embodiment of the present invention.A vertical time axis 302 represents the time at the network adapter(“slave”), and a horizontal time axis 304 represents the networktimeline (“master”). A 45-degrees Graph 306 shows the ideal case,wherein the slave clock exactly follows the master clock. A curve 308represents the master to slave relationship if there is noSyntonization—the gap between graph 306 and graph 308 continuouslywidens. Graph 310 represents the master to slave relationship withsynchronization. As can be seen, the slope of graph 310 is adjusted whena deviation is detected; as the corrected frequency continues to drift,the slope is corrected again, so that a good match is achieved. Whentime deviation is measured, the PTP client, does not set the PTP time tothe network time that the PTP client calculates (by subtracting thepropagation delay from the received network time), as such settings maycause non-continuity in graph 310; instead, the slope of graph 310 ismodified so that graph 310 will cross graph 306. In alternativeembodiments, the PTP client may occasionally set the time.

FIG. 4 is a block diagram that schematically describes time-basedingress packet processing (also referred to as “packet processingcircuitry”) in a network adapter, in accordance to embodiments of thepresent invention. Time based packet processing 118 (also illustrated inFIG. 1) comprises an ingress timestamp generator 202 (FIG. 2), which isconfigured to generate precise timestamps when packets are input to thenetwork adapter (according to a PTP time input, generated by the networktime circuitry, that is not shown), a Parser 404, which is configured toextract the headers of the ingress packets, a rule-search-engine 406; asearch table 408 and a steering unit 416.

Search Table 408 comprises a time-range field 410, header field 412 andan action field 414. Each entry of search table 408 comprises atime-range entry, a single header entry and a single action entry. Theheader entry may comprise 1, 0 and X (don't care) bits. The time-rangefield may comprise, for example, an upper limit and a lower limit; andthe action field comprises steering information for the packet (and, insome embodiments, other actions, e.g., security-related). In someembodiments, table 408 is stored in a Ternary Content-Addressable memory(TCAM); in other embodiments, the table is stored using a hash functionin a Random Access Memory (RAM); and, in yet, other embodiments, table408 is stored in a combination of RAM and TCAM.

Rule-search-engine 406 receives the packet header from parser 404 andthe ingress timestamp from the ingress timestamp generator. Therule-search engine communicates with rule-table 408, and searches for amatch to the timestamp and the packet header in the table.Rule-search-engine 406 may comprise a finite-state-machine, searchingfor a rule match in one or more clock cycles, or a single cycle matchengine.

If the rule-search-engine finds a matching rule to the packetheader/timestamp, the rule-search-engine may send to steering unit 416steering information for the packet; if no matched rule is found, therule-search-engine may send a drop indication to the steering unit, sothat a packet that is not received in the allocated timeslot will beignored. For example, if the timeslot allocation defines that thenetwork adapter receives packets during a predefined timeslot, ruletable 408 may comprise an entry that defines an allowed time-rangecorresponding to the allocated time-slot, and an action field thatdirects the steering unit to forward the packet to a predefined virtualmachine.

Steering Unit 416 receives the Ingress packets from the ingress port anda corresponding action from rule-search-engine 406 and executes theaction. For example, steering unit 416 may forward the packet to one ofa plurality of output queues, wherein each output queue is associatedwith a separate virtual machine. Typically, if the time indicated by thetimestamp is not within the allocated timeslot, the steering unit willreceive a Drop action for the rule search engine and ignore the packet;in some embodiment the steering unit may such packets to a defaultqueue, configured. to handle non-TDM traffic.

In some embodiments, the packet steering operation may be sequential,consuming several cycles during which different parts of the packetheader are parsed, and different rules are searched for. To that end,Rule Search Engine 406 is further configured to control Parser 404 toparse different header fields at different cycles, and Steering Unit 406is further configured to control the access to Rule-Table 408, so as tosend different rules to the Rule-Search engine.

Thus, according to the example embodiment illustrated in FIG. 4, networkadapter 102 receives TDMA communication from the network; a rule-searchengine compares the timestamp generated when the network adapterreceives the packet with a range that corresponds to the allocatedtimeslot, and determines a suitable packet action—e.g., ignore thepacket if the timestamp is not within the allocated timeslot, or steerthe packet to a destination derived from fields in the packet header.

The configuration of time-based ingress packet processing 118, shown in4, is an example configuration that is shown purely for the sake ofconceptual clarity. Any other suitable configurations can be used inalternative embodiments. For example, in some embodiments, a relativetime may be used, to reduce the interactions with the processor: i) thetime range field defines a relative time measured from the beginning ofthe TDMA cycle; ii) the network adapter comprises a TDMA-start-timeregister, which stores the network time of the start of the current TDMAcycle and increment in every TDMA cycle by the duration of the TDMAcycle; and, iii) the rule-search engine subtracts the TDMA-start-timeregister value from the timestamp, and searches the rule table with thedifference.

In an embodiment, the network adapter comprises separate searchcircuitries for the timestamp and for the steering rules, which may workconcurrently or serially; in an embodiment, the searches are pipelined.

In some embodiments, the network adapter may additionally oralternatively modify packet contents based on the time of arrival.

Packet Pacing

Aspects of Packet pacing techniques are described, for example, in U.S.patent application Ser. No. 16/430,457, filed Jun. 4, 2019, which isassigned to the assignee of the present patent application and whosedisclosure is incorporated herein by reference. In a typical packetpacing mechanism, a credit allocation circuitry, with a pico-secondresolution sends credits to send bits of information to various queues.A queue will output a pending packet only if the number of credits thatthe queue has is more than the total number of bits of the pendingpacket. The credit allocation circuitry sends credits to the queuesaccording to bandwidths that are allocated to the queues and accordingto the elapsed time. For example, if the credit allocation circuitry isinvoked every 10 micro-seconds and one of the queues is allocated a 200Mbps bandwidth, the credit allocation circuitry will send to the queue2000 credits whenever the credit-allocation circuitry is invoked.

In an embodiment, the credit allocation circuitry is coupled to the PTPclock of the network adapter, and, thus, closely follows the network.clock.

By sending evenly spaced fixed duration dummy packets, the networkadapter will generate equally spaced completion queue entries (CQEs)that correspond. to the dummy packets and comprise unique ProducerIndexes (PIs). For example, if the processor sends 64-byte dummy-packetsat a rate which is continually adjusted to 128,000,000 byte per second,a CQE will be generated every 500 nanoseconds. As each generated CQE hasa corresponding PI, there is a one-to-one correspondence between the PIand the PTP time of the network adapter.

FIG. 5 is a block diagram that schematically illustrates timedtransmission of packets from a network adapter, in accordance withembodiments of the present invention. Timed-Transmit Queue 120 (FIG. 1)comprises Write-Queue-Entry (WQE) queues 122A through 122D, a dummy-WQE122E, and rate control units 124A through 124E. Dummy-WQE 122E comprisesdummy packets, which are not necessarily egress from the network adapterbut generate completion queue entries, that are sent to a dummy CQEqueue 126, comprising CQE entries, wherein each CQE entry comprises theproducer index (PI) values that the network adapter assigns to the dummypackets. As explained above, the length of the dummy entries and thecontrolled rate of dummy-WQE 122E are such that dummy-CQE entries willbe generated at equal time intervals; as each CQE comprises a separatePI, there a one-to-one correspondence between the PI and the time atwhich the dummy packets would exit the network adapter (as describedabove, the dummy packets are not sent to the network).

In the example embodiments illustrated in FIG. 5, each WQE queue 122Athrough 122D comprises, in addition to queue entries, Wait commands,which instruct the queue (or, more precisely, a selector that is notshown, configured to extract entries from the WQE queues and send thecorresponding packets) to wait until the PI extracted from the dummy-COEqueue matches the time of the allocated time-slot. The Walt commands maycomprise time parameters, or a PI value.

Timing flow 128 illustrates the timed egress of packets from, thenetwork adapter. According to the example embodiment illustrated in FIG.5, the timeslots allocated for network element 102 cover most of theTDMA cycle (as would be evident, in typical embodiments this will not bethe case). The network adapter sends packets from WQE1 and WQE2 in oddtimeslots, and packets from WQE3 and WQE4 in even timeslots. In someembodiments, additional circuitry of timed-transmit-queue 120 furtherguarantees that no packets will be transmitted outside the allocatedtransmit timeslot.

In summary, the timed-transmit-queue of network adapter 102 comprisesWQE queues for transmitting packets over the network, the queuescomprising WQE entries and Wait entries. An additional dummy-packet WQEqueue is operable to transmit evenly spaced dummy packets, and receive acorresponding every spaced CQE queue, which comprises PIs. The WOEqueues do not send the stored packets until the Walt commands areexecuted—that is, until a PI which correspond to the time indicated thewait command is received.

As would be appreciated, the configuration of timed-transmit queue 120,shown in FIG. 5, an example configuration that is shown purely for thesake of conceptual clarity. Any other suitable configurations can beused in alternative embodiments. For example, in some embodiments, waitcommands are not embedded in WQE1 through WQE4; rather, a circuitry inthe timed-transmit queue receives wait parameters from the processor(one per queue, or one for a plurality of queues), and disables theoutput of the corresponding queue until the wait parameter matches thePI that the dummy-QE outputs. The Wait parameters may be specified intime-units or in PI units; in some embodiments, incremental rather thanabsolute PI or time values may be used. The number of WQE queues mayvary and some or all the rate control units may be aggregated.

FIG. 6 is a block diagram that schematically illustrates anoptical-switching system 600, in accordance with an embodiment of thepresent invention. The optical switching system may be, for example, ahigh-performance datacenter, comprising a plurality of processors,interconnected by a fast optical-switching network 602.

Typically, in optical switching networks, routing cannot be done basedon packet headers, because the packets are not analyzed in the opticalmedium (to avoid optical-electrical conversion and processing delays).Instead, a TDMA protocol is used, and in each TDMA timeslot the opticalswitching network establishes optical links from a set of input ports toa set of output ports, e.g., establishes and tears down circuitconnections over time according to predefined or real-time calculatedschedule. (This is different from non-optical datacenter networks, whichimplement packet switching rather than circuit switching.)

According to the example embodiment illustrated in FIG. 6,optical-switching network 602, comprises a plurality of optical switches604 (three optical switches 604A, 504E and 604C are illustrated in theexample embodiment of FIG. 6; any other suitable number can be used inalternative embodiments). The optical switches are interconnected byoptical links that transfer light modulated by packet data. Some or allthe optical switches may also be coupled to processors, or to additionaloptical switching networks.

A Control Unit 610 is configured to allocate timeslots to the opticalswitches and to the coupled processors, according to a preset scheduleor to a real-time calculated schedule generated by a scheduler; in someembodiments the scheduler may be embedded in the control unit; in otherembodiments the scheduler is external to the control unit. which may ormay not reside at the control unit.

In the example embodiment illustrated in FIG. 6, optical switch 604C iscoupled through an Optical-to-Electrical interface 606 to ingress port112 of network adapter 102 (FIG. 1), and through Electrical-to-Opticalinterface 608 to egress port 114. Processor 106 receives ingresstimeslot allocation from control unit 106 and sets time-basedpacket-steering 118 to receive packets at the allocated timeslots (aswas described with reference to FIG. 4). Likewise, the processorreceives egress timeslot allocation from the control unit and sets thetime-based queue to transmit packets at the allocated timeslots (as wasdescribed with reference to FIG. 5).

The configuration of optical-switching system 600, shown in FIG. 6, isan example configuration that is shown purely for the sake of conceptualclarity. Any other suitable configurations can be used in alternativeembodiments, including, for example, systems with multiple opticalswitching networks and hybrid systems with optical and electricalswitching networks. Control Unit 610 may be implemented as a softwareprogram running on a processor (which may be dedicated to controllingthe optical network or shared with other functions).

In some embodiment, unidirectional communication is implemented, opticalswitch 604C is split to two unidirectional switches, whereinElectrical-to-Optical interface 608 is coupled to an egress opticalswitch, and Optical-to-Electrical interface 606 is coupled to an ingressoptical switch.

In the descriptions hereinabove, techniques to implement TDM and TDMAnetworks using network adapters (or, in general, network elements) havebeen disclosed; two example applications were demonstrated—eCPRI andOptical Switching systems. As would be appreciated, the disclosedtechniques are in no way limited to eCPRI and Optical Switching system.Any other suitable application may be used in alternative embodiment,including, for example, Video-over-IP.

The different components of the network elements described herein, e.g.,of network adapter 102 (FIGS. 1 and 6), PTP support circuits 200 (FIG.2), and/or time-based packet-steering unit 118 (FIG. 4), may beimplemented using suitable hardware, such as in one or moreApplication-Specific integrated Circuits (ASICs) or Field-ProgrammableGate Arrays (FPGAs), using software, using hardware, or using acombination of hardware and software elements.

In some embodiments, processor 106 comprises a general-purposeprocessor, which is programmed in software to carry out the functionsdescribed herein. The software may be downloaded to the processor inelectronic form, over a network or from a host, for example, or it may,alternatively or additionally, be provided and/or stored on nontransitory tangible media, such as magnetic, optical, or electronicmemory.

Although the embodiments described herein mainly address networkadapters, the methods and systems described herein can also be used inother applications, such as in network switches.

It will thus be appreciated that the embodiments described above arecited by way of example, and that the present invention is not limitedto what has been particularly shown and described hereinabove. Rather,the scope of the present invention includes both combinations andsub-combinations of the various features described hereinabove, as wellas variations and modifications thereof which would occur to personsskilled in the art upon reading the foregoing description and which arenot disclosed in the prior art. Documents incorporated by reference inthe present patent application are to be considered an integral part ofthe application except that to the extent any terms are defined in theseincorporated documents in a manner that conflicts with the definitionsmade explicitly or implicitly in the present specification, only thedefinitions in the present specification should be considered.

1. A network element, comprising: one or more network ports configuredto communicate with a communication network; network time circuitry,configured to track a network time defined in the communication network;and packet processing circuitry, configured to: receive a definition ofone or more timeslots that are synchronized to the network time; andsend outbound packets to the communication network depending on thetimeslots.
 2. The network element according to claim 1, wherein the oneor more timeslots comprise a plurality of timeslots that are assigned tothe network element in a periodic time schedule that is synchronized tothe network time.
 3. The network element according to claim 1, whereinthe packet processing circuitry is configured to send the outboundpackets only during the one or more timeslots.
 4. The network elementaccording to claim 1, wherein the packet processing circuitry isconfigured to generate a series of dummy packets, to record networktimes corresponding to egress of the dummy packets, and to send theoutbound packets to the communication network depending on the one ormore timeslots and on the recorded network times.
 5. The network elementaccording to claim 1, wherein the network. ports are configured to sendthe outbound packets to a wireless network. operating in. Time-Division.Multiple Access (TDMA).
 6. The network element according to claim 1,wherein the network ports are configured to send the outbound packets toan optical switching network operating in Time-Division Multiple Access(TDMA).
 7. The network element according to claim 1, wherein, inaddition to sending the outbound packets depending on the timeslots, thepacket processing circuitry is configured to send additional packets tothe communication network independently of the timeslots.
 8. The networkelement according to claim 1, wherein the outbound packets compriseEthernet packets or Infiniband packets.
 9. A network element,comprising: one or more network ports configured to communicate with acommunication network; network time circuitry, configured to track anetwork time defined in the communication network; and packet processingcircuitry, configured to: receive a definition of one or more timeslotsthat are synchronized to the network time; and process inbound packets,which are received from the communication network, depending on thetimeslots.
 10. The network element according to claim 9, wherein thepacket processing circuitry is configured to process an inbound packetonly if an arrival time of the inbound packet is during the one or moretimeslots.
 11. A network element, comprising: one or more network portsconfigured to communicate with a communication network; network timecircuitry, configured to track a network time defined the communicationnetwork; and packet processing circuitry, configured to: queue outboundpackets in one or more queues; assign credits to the queues depending onthe network time; and transmit the outbound packets to the communicationnetwork in accordance with the assigned credits.
 12. A. network element,comprising: one or more network ports configured to communicate with acommunication network; network time circuitry, configured to track anetwork time defined in the communication network; and packet processingcircuitry, configured to: queue outbound packets pending fortransmission to the communication network; and transmit a pendingoutbound packet to the communication network synchronously with an eventthat is defined in accordance with the network time.
 13. A networkelement, comprising: one or more network ports configured to communicatewith a communication network; network time circuitry, configured totrack a network time defined in the communication network; and packetprocessing circuitry, configured to: transmit outbound packets to thecommunication network; and stop transmission of an outbound packet at aspecified time in accordance with the network time.
 14. A networkelement, comprising: one or more network ports configured to communicatewith a communication network; network time circuitry, configured totrack a network time defined in the communication network; and packetprocessing circuitry, configured to: receive inbound packets from thecommunication network.; determine times-of-arrival of the inboundpackets, in accordance with the network time; and distribute the inboundpackets to multiple queues based on the times-of-arrival.